package com.own.business.message.center.entity.map;

import com.own.business.message.center.entity.po.MessageCenterGroup;
import com.own.component.common.base.entity.BaseMap;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * MessageCenterGroupMapVo
 *
 * @author chenxueli
 * @date 2023-11-13 14:39:27
 */
@Schema(title = "消息中心分组" + ConstantBeanSuffix.MAP_VO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class MessageCenterGroupMapVo extends BaseMap<MessageCenterGroup> implements Serializable {

    @Schema(title = "封面")
    private String cover;

    @Schema(title = "图标")
    private String icon;

    @Schema(title = "选中的图标")
    private String selectedIcon;

    @Schema(title = "消息key")
    private String groupKey;

    @Schema(title = "类型名称")
    private String name;

    @Schema(title = "是否显示（0=不显示 1=显示）")
    private Integer isShow;

    /**
     * 构造方法
     *
     * @param entity 原对象
     */
    public MessageCenterGroupMapVo(@NonNull MessageCenterGroup entity) {
        super(entity);
        this.cover = entity.getCover();
        this.icon = entity.getIcon();
        this.selectedIcon = entity.getSelectedIcon();
        this.groupKey = entity.getGroupKey();
        this.name = entity.getName();
        this.isShow = entity.getIsShow();
    }

}
